package com.atguigu.dao;

import com.atguigu.bean.Employee;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface EmployeeMapper {

    //多条记录封装一个map，
    @MapKey("id")
    public Map<String, Object> getEmpByLastNameLikeReturnMap(String lastName);

    //返回一条记录的map
    public Map<String, Object> getEmpByIdReturnMap(Integer id);

    public List<Employee> getEmpsByLastNameLike(String lastName);

    public Employee getEmpByMap(Map<String, Object> map);

    public Employee getEmpByIdAndLastName(@Param("id") Integer id, @Param("lastName")String lastName);

    public void addEmp(Employee employee);

    public void deleteEmpById(Integer id);

    public Boolean updateEmp(Employee employee);

    public Employee getEmployeeById(Integer id);

    public Employee getEmployeeByIdIncludeDept(Integer id);

}
